home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 7
/
007.d81
/
wind chill
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
8KB
|
256 lines
100 rem /=============================
110 rem / wind chill program
120 rem / presents:
130 rem / wind chill factors
140 rem / equivalent temps.
150 rem / explanations
160 rem / copyright 1984
170 rem / robert a. paul
180 rem / 6 little nook road
190 rem / plaistow, nh 03865
192 rem / translated for the commodore
194 rem / by donna k. woody
200 rem /==============================
210 poke783,peek(783)and254:poke53280,15:poke53281,11:printchr$(5)
215 printchr$(14):printchr$(8):s=65520
245 gosub3000
250 printchr$(147):gosub2020
260 def fn r(y)=int(y*240+.5)/100
270 fori=1to40
280 l$=l$+"#"
290 nexti
300 forx=1to40:m$=m$+"-":nextx
310 printchr$(147):print"[215][201][206][196] [195][200][201][204][204] [198][193][195][212][207][210]"
320 print:printtab(11)"[197]nglish and [205]etric"
330 print:printtab(18)"[205]enu"
340 print
350 printl$
360 print
370 printtab(6)"1. [198]or entering [197]nglish units"
380 printtab(10)"([198]ahrenheit & miles per hour)"
390 print:printtab(6)"2. [198]or entering [205]etric units"
400 printtab(10)"([195]elsius & meters per second)":print
410 printtab(6)"3. [198]or an explanation and"
420 printtab(10)"interpretation of the wind"
430 printtab(10)"chill factor":print
440 printtab(6)"4. [212]o quit this program":print
450 poke781,22:poke782,12:syss:print"[211]election, please: ";
452 poke198,0:wait198,1:gets$
455 s1=val(s$)
460 ifs1<1ors1>4then450
470 ons1goto490,730,970,2270
480 printchr$(147):print:print
489 :
490 rem / wind chill factor - english
491 :
500 printchr$(147)
510 printtab(3)"[215][201][206][196][160][195][200][201][204][204][160][198][193][195][212][207][210][160][201][206][160][203][201][204][207][195][193][204][207][210][201][197][211]"
520 printtab(7)"[208][197][210][160][211][209][213][193][210][197][160][205][197][212][197][210][160][208][197][210][160][200][207][213][210]"
530 print
540 print"[197]nter wind speed"
545 input" in miles per hour: ";v
550 v=v*.44704
560 print"[197]nter temperature"
565 input" in degrees [198]: ";t
570 t=(5/9)*(t-32)
580 x=sqr(v*240)
590 a=x-v+10.45
600 f=a*(33-t)
610 print:print"[212]he [215]ind [195]hill [198]actor is: ":print
620 printtab(4)fn r(f);" kilocalories"
630 printtab(4)"per square meter per hour."
640 gosub1900
650 print:printtab(4)"[211]ensation: "+a$
660 print:printm$
680 printtab(7)"1. [210]epeat more caluclations":print
690 printtab(7)"2. [210]eturn to [215]ind [195]hill menu"
700 poke781,23:poke782,12:syss:print"[211]election, please: ";:
705 poke198,0:wait198,1:gets$
707 s1=val(s$)
710 ifs1<1ors1>2then700
720 ons1goto490,310
729 :
730 rem / wind chill factor -- metric
731 :
740 printchr$(147)
750 printtab(3)"[215][201][206][196][160][195][200][201][204][204][160][198][193][195][212][207][210][160][201][206][160][203][201][204][207][195][193][204][207][210][201][197][211]"
760 printtab(7)"[208][197][210][160][211][209][213][193][210][197][160][205][197][212][197][210][160][208][197][210][160][200][207][213][210]":print:print
770 print"[197]nter wind speed"
780 input" in meters per second: ";v
790 print"[197]nter temperature"
800 input" in degrees [195]elsius: ";t
810 print
820 x=sqr(v*240)
830 a=x-v+10.45
840 f=a*(33-t)
850 print"[212]he [215]ind [195]hill [198]actor is:"
860 print:printtab(4)fn r(f);" kilocalories"
870 printtab(4)"per square meter per hour."
880 gosub1900
890 print:printtab(4)"[211]ensation: "+a$
900 print:printm$
910 printtab(7)"1. [210]epeat more calculations":print
920 printtab(7)"2. [210]eturn to [215]ind [195]hill menu"
930 print
940 poke781,23:poke782,12:syss:print"[211]election, please: ";
942 poke198,0:wait198,1:gets$
945 s1=val(s$)
950 ifs1<1ors1>2then940
960 ons1goto730,310
970 printchr$(147):printtab(7)"[197][216][208][204][193][206][193][212][201][207][206][160]&[160][201][206][212][197][210][208][210][197][212][193][212][201][207][206]":print
980 printtab(17)"[207][198][160][212][200][197]":print
990 printtab(11)"[215][201][206][196][160][195][200][201][204][204][160][198][193][195][212][207][210]"
1000 print:printm$
1010 print"[194]ecause wind removes the heated layer"
1020 print"of air near the body, the effect of the"
1030 print"wind is to reduce the environmental"
1040 print"temperature to a lower value. [212]his"
1050 print"lowered value that we feel is the"
1060 print"sensible temperature (also called the"
1070 print"equivalent temperature). [212]he wind chill"
1080 print"factor ([203]) is a measure of the quantity"
1090 print"of heat, in kilogram calories ([203][195][193][204])"
1100 print"that can be lost to the air in one hour"
1110 print"from an exposed surface of one square"
1120 print"meter ([203] = [203][195][193][204]/[211][209][213][193][210][197] [205][197][212][197][210]/[200][207][213][210])."
1130 poke781,23:poke782,7:syss:print"[208]ress any key to continue.";
1132 poke198,0:wait198,1:geta$:printchr$(147)
1140 print"[215]ind speeds are in meters per second"
1150 print"and the dry bulb temperature is in"
1160 print"degrees [195]elsius.":print
1170 print"[211]hade is assumed and evaporation is"
1180 print"disregarded. [201]t also assumes a neutral"
1190 print"skin temperature of 33 [195]elsius (91.4 [198])
1200 [153]"and a constant of 10.45 for cooling by"
1210 [153]"radiation and conduction."
1220 [153]
1230 [153]"(NULL)he following table provides a guide"
1240 [153]"to the sensations associated with"
1250 [153]"selected wind chill factors.":[153]
1260 [153]"atnnother table follows that presents"
1270 [153]"traditional 'equivalent temperature'"
1280 [153]"data in ascahrenheit and (NULL).(NULL).left$.":[153]
1290 [151]781,23:[151]782,4:[158]s:[153]"(NULL)ress any key to see the tables.";
1295 [151]198,0:[146]198,1:[161]a$
1300 [153][199](147)
1310 [153]"(NULL)right$(NULL)str$closelenleft$right$(NULL)(NULL)closeascatnlen(NULL)(NULL)(NULL): (NULL)val(NULL)(NULL)atn(NULL)right$(NULL)(NULL)closeascval(NULL)(NULL):"
1320 [153]"---------------------------------------"
1330 [153]" 2000 (NULL) ascreezes tissue"
1340 [153][163]23)"in one minute"
1350 [153]" 1400 (NULL)";[163]20)"ascreezes exposed skin"
1360 [153]" 1200 (NULL)";[163]20)"peekitterly cold":[153]
1370 [153]" 1000 (NULL)";[163]20)"(NULL)ery cold":[153]
1380 [153]" 800 (NULL)";[163]20)"lenold":[153]
1390 [153]" 600 (NULL)";[163]20)"(NULL)ery cool":[153]
1400 [153]" 400 (NULL)";[163]20)"lenool":[153]
1410 [153]" 200 (NULL)";[163]20)"(NULL)uite pleasant":[153]
1420 [153]" 100 (NULL)";[163]20)"(NULL)arm":[153]
1430 [153]" 50 (NULL)";[163]20)"left$ot":[153]
1440 [153][163]2)"(NULL)ress any key to see an equivalent"
1450 [153][163]10)"temperature table";:[151]198,0:[146]198,1:[161]a$
1460 [153][199](147)
1470 [153]"(NULL)otes on table of equivalent"
1480 [153]"temperatures that follow:":[153]
1490 [153]" (NULL)he first vertical column is for"
1500 [153]"temperatures in degrees ascahrenheit."
1510 [153]"(NULL)he first horizontal row presents"
1520 [153]"selected wind speeds. (NULL)ero (NULL). (NULL).left$. is"
1530 [153]"not given because at zero (NULL). (NULL). left$. all"
1540 [153]"equivalent temperatures are the same"
1550 [153]"as the actual air temperatures."
1560 [153]"atn wind speed of 40 (NULL). (NULL). left$. has been"
1570 [153]"omitted; however, its values would be"
1580 [153]"found between the narrow range given"
1590 [153]"for 35 (NULL). (NULL). left$. and 45 (NULL). (NULL). left$. (NULL)ind"
1600 [153]"speeds above 45 (NULL). (NULL). left$. are not given"
1610 [153]"because there is no significant"
1620 [153]"lowering of the 'sensible' temperature"
1630 [153]"beyond 45 (NULL). (NULL). left$."
1640 [153]:[153]
1650 [151]781,23:[151]782,2:[158]s:[153]"(NULL)ress any key to see the next table."
1655 [151]198,0:[146]198,1:[161]a$
1660 [153][199](147)
1680 [151]781,1:[151]782,0:[158]s:[153]"(NULL)val(NULL)(NULL))) (NULL)closeright$close(NULL)closevalclose(NULL) (NULL)closevalclose(NULL) left$ (NULL)close(NULL)close(NULL):"
1690 [153]" asc.)) 5 10 15 20close 25 30 35 45"
1700 [153]"---))----------------------------------"
1710 [153]" 50) 48 40 36 32 30 28 27 26"
1720 [153]" 40) 37